<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
<c:set var="context" value="${pageContext.request.contextPath}"/>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <c:import var="xml" url="/Grids.xml" />
        <x:parse var="doc" doc="${xml}" />
        <x:set var="grid" select='$doc/grids/grid[@id="PageGrid"]' />

        <link rel="stylesheet" type="text/css" href="${context}<x:out select="$grid/uri"/>" />
        <style type="text/css">
            .PageGrid {background-color: pink}
            [class*=Grid-] {
                outline: 1px solid;
            }
        </style>
    </head>
    <body>
        <h1>Hello World!</h1>
        <x:out select="$grid/uri"/><%----%>
        <div class="PageGrid">
            <div class="PageGrid-1">1</div>
            <div class="PageGrid-2">2</div>
            <div class="PageGrid-3">3</div>
            <div class="PageGrid-4">4</div>
            <div class="PageGrid-1">1</div>
            <div class="PageGrid-2-4">2-4</div>
            <div class="PageGrid-1-2">1-2</div>
            <div class="PageGrid-3-4">3-4</div>
            <div class="PageGrid-1-3">
                <div class="PageGrid-1-2">1-2</div>
                <div class="PageGrid-3">3</div>
            </div>
            <div class="PageGrid-4">4</div>
        </div>
    </body>
</html>
